<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<title>Yooes管理中心</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="/sys-admin/css/general.css" rel="stylesheet" type="text/css">
<link href="/sys-admin/css/main.css" rel="stylesheet" type="text/css">
<script src="/sys-admin/js/jquery.js" type="text/javascript"></script>
<script src="/sys-admin/js/cn_message.js" type="text/javascript"></script>
<script src="/sys-admin/js/validate.js" type="text/javascript"></script>
<script src="/sys-admin/js/treeview/jquery.treeview.js" type="text/javascript"></script>
<link rel="stylesheet" href="/sys-admin/js/treeview/jquery.treeview.css"/>
</head>
<body>
<h1><span class="action-span1">角色修改</span></h1>
<div class="list-div">
<form action="/sys-admin/action/auth/role.php" method="post" name="editrole">
<input type="hidden" name="met" value="edit"/>
<input type="hidden" name="role_id" value="<{$role.role_id}>"/>
<table>
  <tr>
    <td class="label"><span class="require-field">*</span>角色名</td>
    <td>
      <input type="text" name="role_name" maxlength="20" value="<{$role.role_name}>" size="24" vtype="required" vname="role_add_name"/><span id="role_add_name_m"></span></td>
  </tr>
  <tr>
    <td class="label">排序</td>
    <td>
      <input type="text" name="sort_order" maxlength="4" value="<{$role.sort_order}>" size="6"  vtype="not-required-n" vname="role_add_sort"/><span id="role_add_sort_m"></span></td>
  </tr>
  <tr>
    <td class="label">权限分配</td>
    <td>
    	<div></div>
    	<div>
    	<input type="button"  value="全选" class="button" onclick="treeAllChecked();"/>&nbsp;&nbsp;
    	<input type="button"  value="全不选 " class="button" onclick="treeAllNoChecked();"/>&nbsp;&nbsp;
    	<input type="button"  value="打开 " class="button" onclick="collapsable();"/>&nbsp;&nbsp;
    	<input type="button"  value="关闭" class="button" onclick="expandable();"/>&nbsp;&nbsp;
    	</div>
    	<div>
    	<ul id="browser" class="filetree">
				<{section name=parent loop=$actions}> 
				     <li>
					<{if count($actions[parent].childs) gt 0}>
						<input type="checkbox" class="tree_cb" name="actionids[]" value="<{$actions[parent].action_id}>" <{if $actions[parent].ischecked eq 1}>checked<{/if}>><span class="folder"><{$actions[parent].action_name}></span>
						<ul>
						<{assign var=childs1 value=$actions[parent].childs}>
						<{section name=key1 loop=$childs1}> 
							<li>
							<{if count($childs1[key1].childs) gt 0}>
							    <input type="checkbox" class="tree_cb"  name="actionids[]" value="<{$childs1[key1].action_id}>" <{if $childs1[key1].ischecked eq 1}>checked<{/if}>><span class="folder"><{$childs1[key1].action_name}></span>
							    <ul id="folder21">
							        <{assign var=childs2 value=$childs1[key1].childs}>
							    	<{section name=key2 loop=$childs2}> 
							    		<li><input type="checkbox" class="tree_cb"  name="actionids[]" value="<{$childs2[key2].action_id}>" <{if $childs2[key2].ischecked eq 1}>checked<{/if}>><span class="file"><{$childs2[key2].action_name}></span></li>
							    	<{/section}>
							    </ul>
							
							<{else}>
							    <input type="checkbox" class="tree_cb" name="actionids[]" value="<{$childs1[key1].action_id}>" <{if $childs1[key1].ischecked eq 1}>checked<{/if}>><span class="file"><{$actions[parent].childs[key1].action_name}></span>
							<{/if}>
							</li>
						<{/section}>
						</ul>
	 				<{else}>
	 					<input type="checkbox" class="tree_cb" name="actionids[]" value="<{$actions[parent].action_id}>" <{if $actions[parent].ischecked eq 1}>checked<{/if}>><span class="file"><{$actions[parent].action_name}></span>
				    <{/if}>
				    </li>
				<{/section}>
			</ul>
    	</div>
   </td>
  </tr>
  <tr>
    <td class="label"></td>
    <td>
      <input type="submit"  name="Submit"   value="保存 " class="button" onclick="return checkForm();"/>&nbsp;&nbsp;&nbsp;
   </td>
  </tr>
  </table>
 </form>
</div>
<script src="/sys-admin/js/treeview/treeview.init.js" type="text/javascript"></script>
</body></html>